<template>
    <transition name="fade">
    <div id="loginPage" v-if="View ==='Login'">
      <div id="login">
         <p class="topic">登录</p>
          <i class="el-icon-circle-close" @click="$emit('be-closed')" ></i>
          <!--<i class="el-icon-circle-close" @click="View=''" ></i>-->
          <form>
              <!--<label for="phoneNum">手机号码:</label><br/>-->
              <input id="phoneNum" type="tel" placeholder="请输入您的手机号码"/><br/>
              <p>*手机号码默认作为登录账户</p>
              <!--<label for="password">密码:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label><br/>-->
              <input id="password" type="password" placeholder="请输入密码"/><br/>
              <button>Login</button>
          </form>
          <p class="register"> <a @click="$emit('register-change')">还没有帐号，快去注册吧</a></p>
      </div>
    </div>
    </transition>
</template>

<script>
    export default {
        name: "Login",
        data(){
            return{

            }
        },
        props:['View'],
        methods:{
            closeLogin(){

            }
        },

    }
</script>

<style scoped>
    .fade-enter-active, .fade-leave-active {
        transition: opacity .5s ease;
    }
    .fade-enter, .fade-leave-to /* .fade-leave-active below version 2.1.8 */ {
        opacity: 0;
    }
#loginPage{
    /*display: none;*/
    z-index: 10;
    position: fixed;
    width: 100%;
    height: 100vh;
    background-color: rgba(0,0,0,0.5);
}
#login{
    position: fixed;
    left: calc((100% - 350px)/2);
    top: calc((100% - 300px)/2);
    background-color: white;
    width: 350px;
    z-index: 5;
    box-shadow: #515151;
    border-radius: 10px;
}

    #login i{
        font-size: 35px;
        position: absolute;
        top: 10px;
        right: 10px;
        color: #ff0a60;
        font-weight: bolder;
    }
    #login i:hover{
        filter: opacity(90%);
        cursor: pointer;
    }
.topic{
    /*background-color: #ff0a60;*/
    /*color: white;*/
    /*padding-top: 5px ;*/
    font-size: xx-large;
    text-align: center;
    margin-top: 10px;
    position: relative;
    top: 5px;
    /*border: 1px solid red;*/
}
#login p{
    /*text-align: center;*/
    width: 100%;
    /*border: 1px solid red;*/
    font-weight: bold;
}
#login form{
    /*text-align: center;*/
    /*border: 1px solid red;*/
    color: #ff0a60;
}
#login form p{
    position: absolute;
    left: 10%;
    top: 38%;
}
#login form input,#login form button {
    position: relative;
    /*margin: 30px auto 0px auto;*/
    left: 10%;
    height: 40px;
    margin: 15px 0px;
    width: 80%;
    border-radius: 5px;
    border: 1px solid rgba(0,0,0,0.2);
}
#login form button{
    background-color: #ff0a60;
    border: none;
    font-size: large;
    color: white;
}
#login form button:hover{
    filter: opacity(90%);
    cursor: pointer;
}
.register{
    font-size: small;
    text-decoration: none;
    margin-bottom: 10px;
    text-align: center;
}

</style>